{include file="public/header" /}
{php}
	$role_status = model('AdminRole')->is_acl('checkbox?module=' . $module . '&field_name=status');
{/php}
<ul class="tab-label">
	<li class="on">{$_cur_title}</li>
</ul>
<table class="data-list">
	<tbody>
		<tr>
			<th width="40"><input type="checkbox" onclick="$.checkbox(this,'.select-box')"></th>
			<th width="50">ID</th>
			<th width="60">图片</th>
			<th>名称</th>
			<th width="55">排序</th>
			<th width="150">创建时间</th>
			<th width="50" {$role_status}>启用</th>
			<th width="120">操作</th>
		</tr>
		{volist name="list" id="rs"}
			<tr class="data-{$rs[$pk_key]}">
				<td class="select-box">
					<input type="checkbox" name="ids[]" value="{$rs[$pk_key]}">
				</td>
				<td><input type="hidden" name="id_arr[]" value="{$rs[$pk_key]}">{$rs[$pk_key]}</td>
				<td><a href="{$rs['img_url']}" class="view_big_pic"><img src="{:img($rs['img_url'], 200, 200)}" width="40" height="40"></a></td>
				<td>{$rs['title']}</td>
				<td>
					<input class="ta-c" type="text" name="order_id[{$rs[$pk_key]}]" value="{$rs['order_id'] == 99 ? '' : $rs['order_id']}">
				</td>
				<td>{:date('Y-m-d H:i:s', $rs['create_time'])}</td>
				<td {$role_status}>
					<input class="ajax_checkbox" url="{:url('checkbox', array('module' => $module, 'field_name' => 'status', 'pk_val' => $rs[$pk_key],'pk_key'=>$pk_key))}" type="checkbox" value="1" {$rs['status'] ? 'checked' : ''}>
				</td>
				<td>
					<a class="btn btn-default" href="{:url('index', array('module' => $module, 'parent_id' => $rs[$pk_key], 'up_parent_id' => $rs['parent_id']))}" title="下级">
						<i class="icon-list"></i>
					</a>
					<a href="{:url('edit', array('module' => $module, $pk_key => $rs[$pk_key], 'parent_id' => $parent_id, 'up_parent_id' => $up_parent_id))}" class="btn btn-default">
						<i class="icon-edit"></i>
					</a>
					<a class="btn btn-default confirm-opt" href="{:url('delete', array('module' => $module, $pk_key => $rs[$pk_key]))}" title="删除" msg="您确认要删除此记录？" del-class="data-{$rs[$pk_key]}">
						<i class="icon-delete"></i>
					</a>
				</td>
			</tr>
		{/volist}
		
	</tbody>
</table>
<div class="opt-page-box">
	<ul class="button-group">
		<li class="btn bg-default jump" url="{:url('add', array('module' => $module, 'parent_id' => $parent_id, 'up_parent_id' => $up_parent_id))}"><i class="icon-plus"></i>添加</li>
		<li class="btn bg-default batch-edit" url="{:url('index', array('module' => $module))}?module={$module}&parent_id={$parent_id}&up_parent_id={$up_parent_id}"><i class="icon-sort"></i>排序</li>
		{gt name="parent_id" value="0"}
			<li class="btn bg-default jump" url="{:url('index', array('module' => $module, 'parent_id' => $up_parent_id))}"><i class="icon-back"></i>上一级</li>
		{/gt}
	</ul>
	{$page}
</div>

{include file="public/footer" /}